﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkBasket.Data.Entities
{
 


    public class FormControl
    {  
        [Key]
        public int FormControlID { get; set; }
        public string ControlName { get; set; }

        public string ClassName { get; set; }

        public int? Sort { get; set; }
        public string Properties { get; set; }



        public int? ParentControlID  { get; set; }

        [JsonIgnore]
        public virtual FormControl RootFormControl { get; set; }

        public int FormID { get; set; }

        
        [JsonIgnore]
        public virtual Form Form { get; set; }

        [JsonIgnore]
        public virtual ICollection<FormControl> ChildControls { get; set; }
        [JsonIgnore]
        public virtual FormControl ParentControl { get; set; }



    }
}
